<?php $public_application = $this->config->item('public_application');?>


	
<div class="main-bg clearfix">
  <div class="container main-box clearfix" style="max-width:970px;">
     <div class="row">
          <div class="col-md-6 col-md-offset-3">
		          <p class="text-center mt-2em">
		            <a href="<?php echo site_url('account');?>" class="btn btn-danger btn-lg  cur-active"> 基本资料 </a>&nbsp;&nbsp;&nbsp;&nbsp;	    
		            <a href="<?php echo site_url('ecard/ecardList');?>" class="btn btn-danger btn-lg">我品牌书</a>
		          </p>
		  </div>
	  </div>
	  <div class="row">
	  
			
	<?php 
		if(isset($ecards)){
		
			
			foreach($ecards as $card){
				?>
				
      <div class="col-md-3 col-sm-3  col-md-offset-0 col-sm-offset-0 col-xs-6">
            <div class="make2-book-box center-block">
		        <img class="center-block img-responsive" src="<?php echo base_url($card['url']); ?>">
		        <h5><?php echo $card['title'] ?></h5>
		        <p class="clearfix">
			 <form action="<?php echo site_url('ecard/download/')?>" method="post" target="_blank">
				  <input type="hidden" name="filename" value="<?php echo $card['url']?>">
		          <button type="submit" class="btn btn-danger btn-sm pull-left"><span class="glyphicon glyphicon-download-alt"></span>下载</button>
		    </form> 
			 <a type="button" onclick="ecardShare({'pic':'<?php echo base_url($card['url']); ?>'})" class="btn btn-danger btn-sm pull-right"><span class="glyphicon glyphicon-share"></span>分享</a>
                </p>
             </div>
		  </div>
				
				<?php 
				}
		
			}
		
	?>
	  
    
		  
		 
		  <div class="col-md-3 col-sm-3  col-md-offset-0 col-sm-offset-0 col-xs-6">
            <div class="make2-book-box center-block">
		        <div class="add_button3_box">
		         <a style="color:#fff;" href="<?php echo site_url('ecard/index')?>">
		          <span class="glyphicon glyphicon-plus add_icon"></span>
		          <p style="margin-top:5px;">添加新的定制名片</p>
		        </a>
		        </div>
             </div>
		  </div>		  
	  </div>
	</div>
  </div>


<script src="<?php echo base_url($public_application."js/jquery.validate.min.js")?>"></script>

<script>
	var jiathis_config = {
			pic:"",
			data_track_clickback:true,
			"shortUrl":false
	}
	function ecardShare(options){
		jiathis_config = $.extend(jiathis_config,options);
		
		$('#modal_show').modal();
	}
</script>
<div class="modal fade flex" id="modal_show">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">分享我品牌书</h4>
      </div>
      <div class="modal-body">
        <p>快来分享给你的朋友吧</p>
            <!-- JiaThis Button BEGIN -->
			<div class="jiathis_style_32x32">
				<a class="jiathis_button_qzone"></a>
				<a class="jiathis_button_tsina"></a>
				<a class="jiathis_button_tqq"></a>
				<a class="jiathis_button_weixin"></a>
				<a class="jiathis_button_renren"></a>
				<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
			</div>
			<script>
			//var jiathis_config
			</script>
			<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1334755083138105" charset="utf-8"></script>
			<!-- JiaThis Button END -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
	
